package csvs

import (
	"MyWuXiaGame/server/src/utils"
)

type ConfigPlayerLevel struct {
	Level 	int 	`json:"Level"`
	Ability	string  `json:"Ability"`
	Exp 	int 	`json:"Exp"`
	JobAttr  TGrowthLineJobAttr
}

var (
	ConfigPlayerLevelSlice []*ConfigPlayerLevel
)

func init() {
	utils.GetCsvUtilMgr().LoadCsv("PlayerLevel", &ConfigPlayerLevelSlice)
	return
}

func GetNowLevelConfig(level int) *ConfigPlayerLevel {
	if level <= 0 || level > len(ConfigPlayerLevelSlice) {
		return nil
	}
	return ConfigPlayerLevelSlice[level-1]
}
